Skip to content

Add STDEXEC_MAIN_PROJECT and STDEXEC_INSTALL to CMake#1931

Merged
ericniebler merged 5 commits intoNVIDIA:mainfrom
mathisloge:patch-3
Mar 17, 2026
Merged

Add STDEXEC_MAIN_PROJECT and STDEXEC_INSTALL to CMake#1931
ericniebler merged 5 commits intoNVIDIA:mainfrom
mathisloge:patch-3

Conversation

@mathisloge
Copy link
Contributor

@mathisloge mathisloge commented Mar 13, 2026

It is common practice to be able to disable install targets because they can conflict with in-tree builds (for example when stdexec is added via CPM).

Most projects use a top-level project check to enable installs by default when stdexec is the main project and otherwise disable them. I've applied the same pattern here and also replaced the remaining BUILD_TESTING usages with STDEXEC_BUILD_TESTS.

  • Disable install/export targets by default; enable only when stdexec is the top-level project.
  • Add STDEXEC_MAIN_PROJECT and STDEXEC_INSTALL.
  • Replace remaining BUILD_TESTING with STDEXEC_BUILD_TESTS.
  • Conditionally install asioexec, tbbexec, etc., to avoid conflicts when used as a dependency.

At least resolves my pain with the install targets when pulling stdexec via CPM/FetchContent or add_subdirectory.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 13, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copy link
Collaborator

@ericniebler ericniebler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good. just one comment.

@ericniebler
Copy link
Collaborator

/ok to test b9a585f

@mathisloge mathisloge requested a review from ericniebler March 17, 2026 06:50
@ericniebler
Copy link
Collaborator

/ok to test 88ccf54

@ericniebler
Copy link
Collaborator

/ok to test fc00a6d

@ericniebler ericniebler merged commit 74ef3d9 into NVIDIA:main Mar 17, 2026
26 checks passed
@ericniebler
Copy link
Collaborator

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants